var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// 父类
var Aniaml = /** @class */ (function () {
    function Aniaml(name, age) {
        this.name = name;
        this.age = age;
    }
    Aniaml.prototype.sayHi = function (str) {
        console.log('hi,' + str);
    };
    return Aniaml;
}());
var Dog = /** @class */ (function (_super) {
    __extends(Dog, _super);
    function Dog(name, age, love) {
        var _this = _super.call(this, name, age) || this;
        _this.love = love;
        return _this;
    }
    Dog.prototype.sayHi = function () {
        console.log('hi,' + this.name);
    };
    Dog.prototype.myLove = function () {
        console.log(this.name + '爱好' + this.love);
        _super.prototype.sayHi.call(this, '父类的sayHi');
        // super.可以在子类中调用父类方法
    };
    return Dog;
}(Aniaml));
var Dog1 = new Dog('小猫', 18, '吃鱼');
Dog1.myLove();
Dog1.sayHi();
